/**
 * trying to get width/height
 */

var movieXHR;
var movieWidth;
var movieHeight;

var movieUrl = "http://www.netflix.com/WiPlayer?movieid=";

function handleMovieResult(doc)
{
	movieWidth = doc.split('width: ')[1].split('px')[0];
	movieHeight = doc.split('height: ')[1].split('px')[0];
	
	var dctk = connected.toolkit;
	connected.debug.print("width= "+movieWidth);
	connected.debug.print("height= "+movieHeight);
	
}

function startMovieRequest()
{
    movieXHR = new XMLHttpRequest();
    movieXHR.onreadystatechange = onMovieXHRStateChange;
    movieXHR.open("GET", movieUrl+movieId, true);
	movieXHR.overrideMimeType('text/xml');
    movieXHR.send(null);
}

function onMovieXHRStateChange()
{
    if (movieXHR.readyState == 4)
    {
        if (movieXHR.status == 200)
        {
            //findMedia(movieXHR.responseXML);
			handleMovieResult(movieXHR.responseText);
        }
    }
}